﻿#region Using declarations
using System;
using System.ComponentModel;
using System.Drawing;
using System.Globalization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Indicator;
using NinjaTrader.Strategy;
#endregion

// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
    partial class Strategy
    {
        ///Returns the calendar date YYYMMDD for the specified Julian date.
        ///Syntax: JulianToDate(jDate);
        ///jDate: numeric expression for the date in Julian format.
        public int JulianToDate(int jDate)
        {
            DateTime date = new DateTime(1900, 1, 1);
            DateTime greg = date.AddDays(jDate - 2);
            return DateToTSDate(ToDay(greg));
        }

    }
}
